package com.wangzhixuan.db.dao;

import com.wangzhixuan.db.bean.Department;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 *
 * @author victor
 */
@Repository
public interface DepartmentDao {
  
  /**
   * Get department by id
   *
   * @param departmentId
   * @return
   */
  public Department getDepartmentById(@Param("departmentId") long departmentId);
  
  /**
   * Get department by name
   *
   * @param name
   * @return
   */
  public Department getDepartmentByName(@Param("name") String name);
  
  
  public List<Department> getAllDepartment();

  public List<Department> getBaseDepartment();

  public List<Department> getDepartmentsByParentId(@Param("parentId") long parentId);

}
